package com.xhl.doeverything.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * @author xionghuilong
 * @description: 数据库配置信息示例
 * @date 2021/11/27 16:51
 */
@Component
public class DbConfig {

    @Value("${mysql.ip}")
    private String ip;
    @Value("${mysql.port}")
    private String port;
    @Value("${mysql.driverClassName}")
    private String driverClassName;
    @Bean
    public void init(){
        System.out.println("database inited:" + this.ip + " | " + this.port + " | " + this.driverClassName);
    }


}
